<div class="btn-group">
  <%= link_to("详细",user_path(user),:class=>"btn btn-primary btn-sm")%>
  <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
  	<li>
  	<% if user.enabled%>
  		<%= link_to('禁用',user_path(:id=>user.id,:"user[enabled]"=>0),method: :put) %>
  	<%else%>
  		<%= link_to('启用',user_path(:id=>user.id,:"user[enabled]"=>1),method: :put) %>
  	<%end%>
  	</li>
    <li><%= link_to '编辑',edit_user_path(user)%></li>
    <li><%= link_to '删除', user, method: :delete, data: { confirm: 'Are you sure?' }%></li>
  </ul>
</div>
